import React, { memo } from 'react';
import { Menu } from 'antd';
import { NavLink, HashRouter as Router } from 'react-router-dom';
import { sliderLinks } from '@/services/local-data';

function THSlider() {
  return (
    <Router>
      <Menu defaultSelectedKeys={['0']}>
        {
          sliderLinks.map((item, index) => {
            return (
              <Menu.Item key={index} disabled={index === 5} defaultChecked={index === 0}>
                <NavLink to={ item.link }>
                  {item.title}
                </ NavLink>
              </Menu.Item>
            )
          })
        }
        </Menu>
      </Router>
  )
}

export default memo(THSlider);
